<div class="header" id="header">
    <h1 class="logo">
        <a title="" style="background: url(images/logo.png);" href="index.jsp">电子商务平台</a>
    </h1>
    <div id="login"></div>
    <script>
        let user =  window.sessionStorage.getItem("user");
        if(user!=undefined){
            var $ul="<ul class=\"shortcut\">\n" +
                "        <li class=\"first\"><a href=\"personal.html\">个人中心</a></li>\n" +
                "        <li><a href=\"myOrders.html\">我的订单</a></li>\n" +
                "        <p class=\"loginfo\">你好!"+""+"[<a href=\"javaScript:logout()\">安全退出</a>]</p>\n" +
                "    </ul>";

                $("#login").html($ul);
        }else{
            var $p="<p class=\"loginfo\">\n" +
                "        [<a href=\"login.html\">登录</a> <a class=\"reg\" href=\"adduser.html\">免费注册</a>]\n" +
                "    </p>";
            $("#login").html($p);
        }
    </script>
    <!-- <ul class="shortcut">
        <li class="first"><a href="personal.html">个人中心</a></li>
        <li><a href="myOrders.html">我的订单</a></li>
        <p class="loginfo">你好![<a href="javaScript:logout()">安全退出</a>]</p>
    </ul> -->
    <!-- <p class="loginfo">
        [<a href="login.html">登录</a> <a class="reg" href="register.html">免费注册</a>]
    </p> -->
    <!--        <ul class="shortcut"><li class="first"><a href="personal.html">个人中心</a></li><li><a href="myOrders.html">我的订单</a></li></ul><p class="loginfo">你好![<a href="javaScript:logout()">安全退出</a>]</p>-->
</div>
    <div class="navbar">
        <ul id="goodsType">
            <li><a href="index.jsp">首页</a></li>
            <!-- <li><a href="#">IT技术</a></li>
            <li><a href="#">小说文学</a></li>
            <li><a href="#">历史传记</a></li>
            <li><a href="#">生活</a></li>
            <li><a href="#">经营管理</a></li> -->
<!--        <li><a href="goods.html?gtid=1">IT技术</a></li> <li><a href="goods.html?gtid=2">历史传记</a></li> <li><a href="goods.html?gtid=3">小说</a></li> <li><a href="goods.html?gtid=4">生活</a></li> <li><a href="goods.html?gtid=5">经营管理</a></li>-->
        </ul>
        <div class="mycart">
            <dl>
                <dt>
                    <a href="cart.jsp">购物车
                        <b name="mycart_nums" id="mycart_nums">0</b>件
                    </a>
                </dt>
                <dd>
                    <a href="carts.html">去结算</a>
                </dd>
            </dl>
            <!--购物车浮动div 开始-->
            <div class="shopping" id="div_mycart" style="display: none;">
                <dl class="cartlist" id="shopcarDiv">
                </dl>
            </div>

        </div>
    </div>
    <div class="searchbar">
        <div class="allsort">
            <a href="javascript:void(0);">全部商品分类</a>
            <!--总的商品分类-开始-->
            <ul class="sortlist" id="div_allsort" style="display: none"><li><h2><a href="goods.html?gtid=1">IT技术</a></h2></li><li><h2><a href="goods.html?gtid=2">历史传记</a></h2></li><li><h2><a href="goods.html?gtid=3">小说</a></h2></li><li><h2><a href="goods.html?gtid=4">生活</a></h2></li><li><h2><a href="goods.html?gtid=5">经营管理</a></h2></li></ul>
        </div>
        <script>

        </script>

        <div class="searchbox">
            <!-- <form method='get' action='#'> -->
            <input class="text" type="text" name="q" autocomplete="off" placeholder="输入关键字..." id="word"> <input class="btn" type="submit" value="商品搜索" id="search-btn">
            <!-- </form> -->

        </div>
        <div class="hotwords">
            热门搜索：<a href="#">Java</a>
        </div>
    </div>
